package com.ruoyi.coupons.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户优惠券对象 coupons_user
 * 
 * @author ruoyi
 * @date 2025-11-05
 */
public class CouponsUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long templateId;

    /** 券码（可展示给用户） */
    @Excel(name = "券码", readConverterExp = "可=展示给用户")
    private String code;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String status;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date issuedAt;

    /** 锁定时间（下单未支付） */
    @Excel(name = "锁定时间", readConverterExp = "下=单未支付")
    private Date lockedUntil;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date usedAt;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long usedOrderId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date expireAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTemplateId(Long templateId) 
    {
        this.templateId = templateId;
    }

    public Long getTemplateId() 
    {
        return templateId;
    }

    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setIssuedAt(Date issuedAt) 
    {
        this.issuedAt = issuedAt;
    }

    public Date getIssuedAt() 
    {
        return issuedAt;
    }

    public void setLockedUntil(Date lockedUntil) 
    {
        this.lockedUntil = lockedUntil;
    }

    public Date getLockedUntil() 
    {
        return lockedUntil;
    }

    public void setUsedAt(Date usedAt) 
    {
        this.usedAt = usedAt;
    }

    public Date getUsedAt() 
    {
        return usedAt;
    }

    public void setUsedOrderId(Long usedOrderId) 
    {
        this.usedOrderId = usedOrderId;
    }

    public Long getUsedOrderId() 
    {
        return usedOrderId;
    }

    public void setExpireAt(Date expireAt) 
    {
        this.expireAt = expireAt;
    }

    public Date getExpireAt() 
    {
        return expireAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("templateId", getTemplateId())
            .append("code", getCode())
            .append("status", getStatus())
            .append("issuedAt", getIssuedAt())
            .append("lockedUntil", getLockedUntil())
            .append("usedAt", getUsedAt())
            .append("usedOrderId", getUsedOrderId())
            .append("expireAt", getExpireAt())
            .toString();
    }
}
